import com.sun.deploy.ui.AboutDialog;
import org.omg.CORBA.MARSHAL;
import java.util.Scanner;
import java.util.Random;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        int n=in.nextInt();
        while(n!=0){

        }
    }
    public static void main7(String[] args) {
        Scanner in =new  Scanner(System.in);
        int n = in.nextInt();
        while(n!=0){
            System.out.println(n%10);
            n/=10;
        }
    }
    public static void main6(String[] args) {
     Scanner in = new Scanner(System.in);
     int count = 3;
     while(count!=0){
         System.out.println("请输入你的密码");
         String password = in.nextLine();
         if(password.equals("123456")){
             System.out.println("登录成功");
             break;
         }else{
             count--;
             System.out.println("你还有"+ count+ "次机会");
         }

     }
    }
    // 注意类名必须为 Main, 不要有任何 package xxx 信息
        public static void main5(String[] args) {
            Scanner in = new Scanner(System.in);
            // 注意 hasNext 和 hasNextLine 的区别
            while (in.hasNextInt()) { // 注意 while 处理多个 case
                int n = in.nextInt();
                for(int i =0; i < n; i++){
                    for(int j =0; j < n; j++){
                        if(i==j || (i + j) == n-1){
                            System.out.print('*');
                        }else{
                            System.out.print(' ');
                        }
                    }
                    System.out.println();
                }
            }
        }

    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //生成随机数
        Random random =new Random();
        int randNum = random.nextInt(100);

        while(true){
            System.out.println("请输入猜的数字");
            int n = scanner.nextInt();
            if(n>randNum){
                System.out.println("猜大了");
            }else if(n==randNum){
                break;
            }else{
                System.out.println("猜小了");
            }
        }
        System.out.println("猜对了");
    }
    public static void main3(String[] args) {
        int n=999;
        for(int i = 100;i <= n; i++){
            int t = i;
            int a = t % 10;
            t/=10;
            int b=t%10;
            int c = t / 10;
            int sum= a * a * a + b * b * b +c * c * c;
            if(sum == i){
                System.out.println(i+"是水仙花数");
            }
        }
    }
    public static void main2(String[] args) {
         int a=10;
         int i;
         for(i=2; i<= Math.sqrt(a); i++){
             if(a % i==0)
                 System.out.println("不是素数");

         }
        System.out.println("是素数");
    }
//    判断9出现次数
    public static void main1(String[] args) {
        int i;
        int count=0;
        for(i=1;i<=100;i++) {
            int t=i;
            if(t>10){
                if(t%10==9){
                    count++;
                }
                t/=10;
                if(t==9){
                    count++;
                }
            }
            else{
                if(t==9)
                    count++;
            }
        }
        System.out.println(count);
    }
}
